<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>商家POS机管理维护管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/field/fieldCustomerPos/list">商家POS机管理维护列表</a></li>
		<li class="active"><a href="${ctx}/field/fieldCustomerPos/form?id=${fieldCustomerPos.id}">商家POS机管理维护<shiro:hasPermission name="field:fieldCustomerPos:edit">${not empty fieldCustomerPos.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="field:fieldCustomerPos:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="fieldCustomerPos" action="${ctx}/field/fieldCustomerPos/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		 
		<div class="control-group">
			<label class="control-label">商家：</label>
			<div class="controls">
				<sys:treeselect id="customerCode" name="customerCode.id" value="${fieldCustomerPos.customerCode.id}" labelName="" labelValue="${fieldCustomerPos.customerCode.name}"
					title="商家" url="/field/fieldCustomer/treeData" cssClass="required" allowClear="true" notAllowSelectParent="true"/>
				<span class="help-inline"><font color="red">*</font> </span> 
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">编码：</label>
			<div class="controls">
				<form:input path="code" htmlEscape="false" maxlength="50" class="input-xlarge "/><span class="help-inline"><font color="red">*</font> </span> 商家编码加三位数字
			</div>
		</div>	 
		<div class="control-group">
			<label class="control-label">标签：</label>
			<div class="controls">
				<form:input path="label" htmlEscape="false" maxlength="50" class="input-xlarge "/><span class="help-inline"><font color="red">*</font> </span> 同一门店定义同一个标签
			</div>
		</div>	 		
		<div class="control-group">
			<label class="control-label">联系人：</label>
			<div class="controls">
				<form:input path="contact" htmlEscape="false" maxlength="20" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">联系电话：</label>
			<div class="controls">
				<form:input path="phone" htmlEscape="false" maxlength="14" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">地址：</label>
			<div class="controls">
				<sys:treeselect id="area" name="area.id" value="${fieldCustomerPos.area.id}" labelName="" labelValue="${fieldCustomerPos.area.name}"
					title="地址" url="/sys/area/treeData" cssClass="required" allowClear="true" notAllowSelectParent="true"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">详细地址：</label>
			<div class="controls">
				<form:input path="address" htmlEscape="false" maxlength="500" class="input-xlarge "/>
			</div>
		</div> 
		
		<div class="control-group">
			<label class="control-label">外勤负责人：</label>
			<div class="controls">
				<sys:treeselect id="manageUser" name="manageUser.id" value="${fieldCustomerPos.manageUser.id}" labelName="" labelValue="${fieldCustomerPos.manageUser.name}"
					title="外勤" url="/sys/office/treeData?type=3"  cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">领机时间：</label>
			<div class="controls">
				<form:input path="receiveTime"  htmlEscape="false" maxlength="20" class="input-xlarge" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label">装机时间：</label>
			<div class="controls">
				<form:input path="openTime"  htmlEscape="false" maxlength="20" class="input-xlarge" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
			</div>
		 </div> 
		<div class="control-group">
			<label class="control-label">所属区域：</label>
			<div class="controls">
				<sys:treeselect id="office" name="office.id" value="${fieldCustomerPos.office.id}" labelName="" labelValue="${fieldCustomerPos.office.name}"
					title="商家" url="/sys/office/treeData?type=2" cssClass="required" allowClear="true" notAllowSelectParent="true"/>
				<span class="help-inline"><font color="red">*</font> </span> 
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">机型：</label>
			<div class="controls">
				<form:radiobuttons path="models" readonly="true" items="${fns:getDictList('field_models')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">机器来源：</label>
			<div class="controls">
				<form:radiobuttons path="source" readonly="true" items="${fns:getDictList('field_source')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">打印纸类型：</label>
			<div class="controls">
				<form:radiobuttons path="paper" readonly="true" items="${fns:getDictList('field_paper')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">是否是移动POS机：</label>
			<div class="controls">
				<form:radiobuttons path="mobilePos" readonly="true" items="${fns:getDictList('field_mobilePos')}" itemLabel="label" itemValue="value" htmlEscape="false" class=""/>
			</div>
		</div>		
		<div class="control-group">
			<label class="control-label">S\N码：</label>
			<div class="controls">
				<form:input path="sn" htmlEscape="false" maxlength="50" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">自定义编码：</label>
			<div class="controls">
				<form:input path="code" htmlEscape="false" maxlength="50" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">机器编码：</label>
			<div class="controls">
				<form:input path="pcode" htmlEscape="false" maxlength="50" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">工行资源编码：</label>
			<div class="controls">
				<form:input path="brcode" htmlEscape="false" maxlength="50" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">软件版本号：</label>
			<div class="controls">
				<form:select path="version" class="input-xlarge ">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('field_version')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
			</div>
		</div>

		<div class="control-group">
			<label class="control-label">签约汇率：</label>
			<div class="controls">
				<form:input path="rate" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">押金：</label>
			<div class="controls">
				<form:input path="deposit" htmlEscape="false" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">收据单号：</label>
			<div class="controls">
				<form:input path="receipt" htmlEscape="false" maxlength="20" class="input-xlarge "/>
			</div>
		</div> 
		<div class="control-group">
			<label class="control-label">支行经理：</label>
			<div class="controls">
				<form:input path="manager" htmlEscape="false" maxlength="20" class="input-xlarge "/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">支行经理联系电话：</label>
			<div class="controls">
				<form:input path="managerphone" htmlEscape="false" maxlength="20" class="input-xlarge "/>
			</div>
		</div> 
		<div class="control-group">
			<label class="control-label">备注信息：</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="4" maxlength="255" class="input-xxlarge "/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="field:fieldCustomerPos:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>